From 23632743fdba214fa131bd49714013492d8b5cac Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 23 Nov 2006 15:06:35 +0000 Subject: [PATCH] [BLKFRONT] Only attempt to recover a device on resume if it was connected when we suspended. Signed-off-by: Ian Campbell --- linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index 019e1cca25..95cff46ff9 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -138,10 +138,10 @@ static int blkfront_resume(struct xenbus_device *dev) DPRINTK("blkfront_resume: %s\n", dev->nodename); - blkif_free(info, 1); + blkif_free(info, info->connected == BLKIF_STATE_CONNECTED); err = talk_to_backend(dev, info); - if (!err) + if (info->connected == BLKIF_STATE_SUSPENDED && !err) blkif_recover(info); return err; -- 2.30.2